<!DOCTYPE html>
<html>
<head>
	<script type="text/javascript" src='./dist/jquery-3.2.1.js'></script>
	<title></title>
</head>
<style type="text/css">	

</style>
<body>
<!-- 	实例一：获取输入框内的内容 -->
<form>
	<p>username</p>
	<input type="text" name="username">
	<p>password</p>
	<input type="text" name="password">
	<p><input type="button" value='ok'></p>
</form>
</body>
<script type="text/javascript">
	//实例一：获取输入框内的内容
$(':button').click(function(){
	str=$('form').serialize();
	alert(str);
});

</script>
</html>